#ifndef __PID_H
#define __PID_H

#include "sys.h"
#include "motor.h"
#include "encoder.h"


extern int Current_Encoder,Current_Position,Objective_Position;                          
extern float PID_Position_P,PID_Position_I,PID_Position_D,PID_Speed_P,PID_Speed_I; 
extern u8 MOTORENABLE;

int TIM1_UP_IRQHandler(void);
void Output(int PWM_MOTOR);
int myabs(int a);
int PID_Speed(int Current,int Objective); 
int PID_Position(int Current,int Objective);

#endif
